package view;

import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JCheckBox;
import javax.swing.JComboBox;

import model.TimeSlot;
import model.User;

public class ComboBoxCell extends AbstractCell
{
  private JComboBox<JCheckBox> my_all_available_users;
  
  private User[] my_all_available_users_array;
  
  private List<User> my_selected_users;
  
  private UsersPerTimeSlotPanel my_users_in_timeslot;
  
  
  /**
   * 
   * @param the_slot
   * @param the_users
   */
  public ComboBoxCell(final TimeSlot the_slot, final User[] the_users,
                      final UsersPerTimeSlotPanel the_users_panel)
  {
    super(the_slot);
    
    my_all_available_users = new JComboBox<JCheckBox>();
    my_all_available_users.setBackground(Color.BLUE);
    
    my_selected_users = new ArrayList<User>();
    
    my_users_in_timeslot = the_users_panel;
    my_users_in_timeslot.updateMaster(this);
    
    this.addMouseListener(new MyMouseAdapter());
  }
  
  /**
   * This is the Mouse listener. Used MouseAdapter so I didn't have 
   * to write in all the overridden methods. MouseAdapter does it for me.
   * 
   * @author Tristan D. Boucher
   * @version Commit #12 9/7/2013
   */
  private class MyMouseAdapter extends MouseAdapter 
  {  
    /**
     * Overridden method from interface MouseAdapter.
     * @param the_event The event that was caused by the mouse.
     */
    public void mouseClicked(final MouseEvent the_event)   
    {    
      
    } 
  }
}
